﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BSCMFF.Core.DataAccessLayer;

namespace BSCMFF.Web.Pages.working
{
    public partial class testeditFormEEE : BSCMFF.Core.MultiLanguagePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Session.Remove("source");
            }
            //populate();
            
        }

        protected void b_click(object sender, EventArgs e)
        {
            populate();
        }

        private void populate()
        {
            if (Session["source"] == null)
            {
                int evalID = 28;



                BSCEntities context = new BSCEntities();


                List<User> users = (from eu in context.Evaluation_Evaluator_Employee.Include("User.SBU").Include("User2")
                                    where eu.Evaluation_FK == evalID
                                    select eu.User).ToList();

                //users[0].ma

                //RadGridAlreadyAssignedEmployees.Items
                //if (users.Count != 0)
                //{

                //}
                //else
                //{
                //}
                Session.Add("source", users);
            }

            RadGridAlreadyAssignedEmployees.DataSource = Session["source"];
            RadGridAlreadyAssignedEmployees.DataBind();
        }
    }
}